package com.leemz.design.chapter4.pattern;

import com.leemz.design.chapter4.none.*;

import java.util.ArrayList;
import java.util.List;

public class Ch4PatternClient {
    public static void main(String[] args) {
        LogModel logModel = new LogModel("3", "admin", "2021-12-14 11:23:32", "adapter");
        List<LogModel> list = new ArrayList<>();
        list.add(logModel);
        LogFileOperateApi fileApi = new LogFileOperate("");
        LogDbOperateApi dbApi = new Adapter(fileApi);
        dbApi.createLog(logModel);
        List<LogModel> all = dbApi.getAllLogs();
        System.out.println("all log=" + all);
    }
}
